<!DOCTYPE html>
<html>
    <head>
	<title>css清除浮动</title>
	<meta charset="UTF-8">
	<style>
	    div{
		width:500px;
		/*height: 500px;*/
		background: red;
	    }
	    div span:first-child{
		display: inline-block;
		width: 100px;
		background: #66ff66;
		float: left;
	    }
	    div span:last-child{
		display: inline-block;
		width: 100px;
		background: #ffff66;
		float: right;
	    }
	    p{
		background: #66ffff;
		width: 200px;
		clear: both;
	    }
	</style>
    </head>
    <body>
	<div>
	    <span>111</span>
	    <span>222</span>
	</div>
	<p>段落</p>
    </body>
</html>
